<?php  

 include "OpensslRSA.php";  
$rsa = new OpensslRSA();  

$a['fid']=43;
$a['author']='zzz';
$a['authorid']=76;
$a['subject']='678778';
$a['message']='9';
$a['attachment']=1;
$a['iamge']='8u';
$rst = $a;
$ex = json_encode($rst);  
//加密  
$ret_e = $rsa->PublicEncrypt($ex);  
$ret_e = $rsa->urlsafe_b64encode($ret_e);
echo $ret_e;  
 echo '<pre>'; 
  echo 'fggf';  
  
/*echo '<pre>';  
  
$a = 'test';  
//签名  
$x = $rsa->sign($a);  
//验证  
$y = $rsa->verify($a, $x);  
var_dump($x, $y);  
exit; */